<?php
namespace app\index\controller;
use app\index\controller\Base;
class Cate extends Base
{
    public function index()
    {
        $cateid = input('cateid');
        //查询当前栏目名称
        $cate = db('cate')->find();
        $this->assign('cate',$cate);
        //查询当前栏目下的文章
        $articles = db('article')->where(array('cateid'=>$cateid))->paginate(1);
        $this->assign('articles',$articles);
        return view();
    }
}
